package com.eben.model;

import android.graphics.Canvas;
import android.graphics.Color;

/**
 * This class contains information, such as position and color, about the pointer in the game.
 * It also describes how the pointer should be drawn on the screen. 
 * Not to be mixed with the operating system's cursor.
 * @author Sebbe
 *
 */
public class Pointer extends GameObject{
	
	/**
	 * Creates a pointer at a given position with a radius and with a color
	 * @param position the start position
	 * @param radius the radius of the pointer
	 * @param color the color of the pointer
	 */
	public Pointer(Position position, int radius, int color){
		super(0, 0, position, radius, color);
		paint.setColor(color);
	}
	
	/**
	 * Creates a pointer in the middle of the screen with a default radius and position
	 * @param position
	 * @param radius
	 * @param color
	 */
	public Pointer(){
		this(new Position(120,160), 15, Color.RED);
		
	}
	
	
	@Override
	public void draw(Canvas canvas){
		canvas.drawCircle((float)position.getX(), (float)position.getY(), radius, paint);
	}

	public void updatePosition(Position p){
		position.setPosition(p);
	}

	@Override
	public void updatePosition() {
		//Does nothing. See updatePosition(Position p).
	}

}